package com.xwtec.proxy.v1;

import java.util.Random;

/**
 * @Author: zt
 * @Date: 2021/3/2 21:51
 * 代理模式
 * 最愚蠢的方式，直接改代码
 */
public class Tank implements Movable{
    @Override
    public void move() {
        long start  = System.currentTimeMillis();
        System.out.println("Tank Move claclacla.....");
        try {
            Thread.sleep(new Random().nextInt(4000));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        long end = System.currentTimeMillis();
        System.out.println(end-start);

    }

    public static void main(String[] args) {
        new Tank().move();
    }
}

interface Movable{
    void move();
}
